package com.nt.test.service.impl;


import com.nt.test.entity.User;
import com.nt.test.mapper.UserMapper;
import com.nt.test.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service(value = "UserService")
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public int createUser(User user) {
        return userMapper.insertUser(user);
    }

    @Override
    public User selectUser(User user) {
        return userMapper.selectUser(user);
    }

    @Override
    public List<User> findByUsername(String username) {
        return userMapper.findByUsername(username);
    }
}
